import gtk

class TextDialog(gtk.Dialog):
    def __init__(self, header, body):
        gtk.Dialog.__init__(self, header)
        
        self.set_size_request(400, 200)
        self.add_button(gtk.STOCK_OK, 1)
        text = gtk.TextBuffer()
        text.set_text(body)
        text_view = gtk.TextView(text)
        text_view.set_editable(False)
        text_view.set_cursor_visible(False)
        text_view.set_wrap_mode(gtk.WRAP_WORD)
        self.vbox.pack_start(text_view)

    def do_it(self):
        self.show_all()
        self.run()
        self.hide_all()